package com.kanshu.basictest.ui.activity.view.recyclerview;

import android.content.Intent;
import android.view.View;
import android.widget.AdapterView;

import com.kanshu.basictest.R;
import com.kanshu.basictest.model.menu.MenuItem;
import com.kanshu.basictest.ui.base.BaseListMenuActivity;

import java.util.ArrayList;
import java.util.List;

public class RecyclerViewIndexActivity extends BaseListMenuActivity {
    private static final String TAG = "RecyclerViewActivity";

    @Override
    protected String provideBarTitle() {
        return "RecyclerView测试";
    }

    @Override
    protected List<? extends MenuItem> provideMenuData() {
        List<MenuItem> menuItems = new ArrayList<>();
        menuItems.add(0, new MenuItem("ItemDecoration 测试", R.color.blue_gray_500));
        menuItems.add(1, new MenuItem("LayoutManager  测试", R.color.blue_gray_500));
        return menuItems;
    }


    @Override
    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
        Intent intent = new Intent();
        switch (position) {
            case 0:
                intent.setClass(this, ItemDecorationTestActivity.class);
                break;
            case 1:
                intent.setClass(this, LayoutManagerTestActivity.class);
                break;
        }
        startActivity(intent);
    }
}
